<template>
   <div>
   <van-nav-bar
  title="标题"
  left-text="返回"
  right-text="按钮"
  left-arrow
/>
  <main>
      <van-tree-select height="55vw" :items="items" :main-active-index.sync="active">
  <template #content>
     
      <div class="right"  >
     <van-card
     v-for="(int) in items[active].children"  :key="int.id"
     num="1"
      price="2.00"
     :desc="int.id"
     :title="int.name"
     :thumb="int.img">
      <template #footer>
    <van-button size="mini">+</van-button>
    
  </template>
     </van-card>
   
   

      </div>
   
  </template>
</van-tree-select>
  </main>


<div class="footer">
    
</div>

   </div>
</template>

<script>
import {mapState,mapAction,} from "vuex"
export default {
    name:"Home",
    data(){
        return {
            // items:[],
             active:0
        }
    },
    computed: {
        ...mapState(["items"]),
       ...mapAction(["setAction"])
    },
    created() {
        this.setAction(1)
       
    },
methods: {
},


}
</script>

<style>
  .van-tree-select__nav,.van-tree-select__content{
      height: 600px !important;
  }
</style>